package com.jianqiao.delivery.pay.domain.initr2p;

import lombok.Data;

import java.util.List;

/**
 * author: cyx
 * create: 2024/11/22 17:27
 **/
@Data
public class CreditorEntity {
    private String creditorAgentCountry;

    private String creditorAgentId;

    private String creditorCountry;

    private List<NationalIdentifiersEntity> nationalIdentifiers;

    private String creditorId;

    private String creditorIdType;

    private String creditorMCC;

    private String creditorFirstName;

    private String creditorLastName;

    private String creditorBusinessName;

    private String creditorAliasType;

    private String creditorAlias;

    public CreditorEntity(String creditorAgentCountry, String creditorAgentId, String creditorCountry, List<NationalIdentifiersEntity> nationalIdentifiers, String creditorId, String creditorIdType, String creditorMCC, String creditorFirstName, String creditorLastName, String creditorBusinessName, String creditorAliasType, String creditorAlias) {
        this.creditorAgentCountry = creditorAgentCountry;
        this.creditorAgentId = creditorAgentId;
        this.creditorCountry = creditorCountry;
        this.nationalIdentifiers = nationalIdentifiers;
        this.creditorId = creditorId;
        this.creditorIdType = creditorIdType;
        this.creditorMCC = creditorMCC;
        this.creditorFirstName = creditorFirstName;
        this.creditorLastName = creditorLastName;
        this.creditorBusinessName = creditorBusinessName;
        this.creditorAliasType = creditorAliasType;
        this.creditorAlias = creditorAlias;
    }

    public static CreditorEntityBuild builder() {
        return new CreditorEntityBuild();
    }

    public static class CreditorEntityBuild{
        private String creditorAgentCountry;

        private String creditorAgentId;

        private String creditorCountry;

        private List<NationalIdentifiersEntity> nationalIdentifiers;

        private String creditorId;

        private String creditorIdType;

        private String creditorMcc;

        private String creditorFirstName;

        private String creditorLastName;

        private String creditorBusinessName;

        private String creditorAliasType;

        private String creditorAlias;

        CreditorEntityBuild() {

        }

        public CreditorEntityBuild creditorAgentCountry(final String creditorAgentCountry) {
            this.creditorAgentCountry = creditorAgentCountry;
            return this;
        }

        public CreditorEntityBuild creditorAgentId(final String creditorAgentId) {
            this.creditorAgentId = creditorAgentId;
            return this;
        }

        public CreditorEntityBuild creditorCountry(final String creditorCountry) {
            this.creditorCountry = creditorCountry;
            return this;
        }

        public CreditorEntityBuild nationalIdentifiers(final List<NationalIdentifiersEntity> nationalIdentifiers) {
            this.nationalIdentifiers = nationalIdentifiers;
            return this;
        }

        public CreditorEntityBuild creditorId(final String creditorId) {
            this.creditorId = creditorId;
            return this;
        }

        public CreditorEntityBuild creditorIdType(final String creditorIdType) {
            this.creditorIdType = creditorIdType;
            return this;
        }

        public CreditorEntityBuild creditorMcc(final String creditorMcc) {
            this.creditorMcc = creditorMcc;
            return this;
        }

        public CreditorEntityBuild creditorFirstName(final String creditorFirstName) {
            this.creditorFirstName = creditorFirstName;
            return this;
        }

        public CreditorEntityBuild creditorLastName(final String creditorLastName) {
            this.creditorLastName = creditorLastName;
            return this;
        }

        public CreditorEntityBuild creditorBusinessName(final String creditorBusinessName) {
            this.creditorBusinessName = creditorBusinessName;
            return this;
        }

        public CreditorEntityBuild creditorAliasType(final String creditorAliasType) {
            this.creditorAliasType = creditorAliasType;
            return this;
        }

        public CreditorEntityBuild creditorAlias(final String creditorAlias) {
            this.creditorAlias = creditorAlias;
            return this;
        }

        public CreditorEntity build() {
            return new CreditorEntity(this.creditorAgentCountry ,
                                      this.creditorAgentId ,
                                      this.creditorCountry ,
                                      this.nationalIdentifiers ,
                                      this.creditorId ,
                                      this.creditorIdType ,
                                      this.creditorMcc ,
                                      this.creditorFirstName ,
                                      this.creditorLastName ,
                                      this.creditorBusinessName ,
                                      this.creditorAliasType ,
                                      this.creditorAlias);
        }
    }
}
